#ifndef __MSUBMESH_OBJECT_H__
#define __MSUBMESH_OBJECT_H__

#include "MSceneNode.h"
#include "VertexST.h"
#include <utility>
#include "MTriangle.h"
#include "MMesh.h"

class CMSceneManager;


class CMSubMeshObject : public CMSceneNode
{

public:

	CMSubMeshObject( std::string& strName , MeshPtr& pMesh , unsigned int nMaterialIndex, CMSceneManager* pCreator );
	virtual ~CMSubMeshObject(void);

	virtual bool Update(float fElapsedTime);
		
	MaterialPtr  GetMaterial( void ) const;

	virtual bool IsLightEnabled( void );

	virtual void GetRenderOperation( CMRenderOperation* pRenderOp );

	virtual bool Render(IRenderSystem* pRenderingEngine);

protected:

	MeshPtr                            m_pMesh;
	unsigned int                       m_nMaterialIndex;

};

#endif